import * as Koa from 'koa';              // 导入koa
import * as bodyParser from 'koa-bodyparser';

/**
 * routers
 */
import *as index from './routers';

const app:Koa = new Koa();              // 新建一个Koa对象





app.use(bodyParser());




app.use(index.router.routes());   // 使用路由
app.use(index.router.allowedMethods());


app.listen(8080);           // 监听8080端口

console.log("Server running on http://localhost:8080");
